﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace RSSReader
{
    public partial class frmPostAlarm : Form
    {
        public List<UrlItem> updatePosts = new List<UrlItem>();

        public frmPostAlarm()
        {
            InitializeComponent();
            treeBlogPost.AfterSelect += new TreeViewEventHandler(treeBlogPost_AfterSelect);
        }

        void treeBlogPost_AfterSelect(object sender, TreeViewEventArgs e)
        {
            webBrowser.Navigate(e.Node.Tag.ToString(), false);
        }

        private void Init()
        {
            foreach (UrlItem item in updatePosts)
            {
                TreeNode node = new TreeNode(item.URL);
                node.Text = item.LastPost;
                treeBlogPost.Nodes.Add(node);
            }
        }
    }
}